#pragma region License
/************************************************************************
 *                                                                      *
 * Copyright (C) 2010, 2011 Ghoul                                       *
 * All rights reserved.                                                 *
 *                                                                      *
 ************************************************************************/
#pragma endregion

#include "MSvlb.h"

BOOL WINAPI DllWork ( __in ::HMODULE hModule )
{
    DialogBox(hModule, MAKEINTRESOURCE(DLG_MAIN), NULL, (::DLGPROC)DlgProc);

    FreeLibraryAndExitThread(hModule, 0);
    return TRUE;
}

BOOL WINAPI DllMain ( __in ::HMODULE hModule, __in ::DWORD dwReason, __in __reserved ::LPVOID lpvReserved )
{
    UNREFERENCED_PARAMETER ( lpvReserved );

    if ( dwReason == DLL_PROCESS_ATTACH ) {
        DisableThreadLibraryCalls(hModule);

        HANDLE hThread = NULL;
        hThread = CreateThread(NULL, 0, (::LPTHREAD_START_ROUTINE)DllWork, (::HMODULE)hModule, 0, NULL);
        CloseHandle(hThread);
    }

    return TRUE;
}